package net.daoke.relation.utils;

import cn.hutool.core.collection.CollectionUtil;

import java.util.Map;
import java.util.StringJoiner;

public class MapUtils {
    public static String mapToString(Map<String, Object> map) {
        if (CollectionUtil.isEmpty(map)) return "";
        StringJoiner joiner = new StringJoiner(", ", "{", "}");
        map.forEach((k, v) -> joiner.add(k + ":" + v));
        return joiner.toString();
    }
}
